package com.earl.common.exception;


import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.extern.log4j.Log4j2;
import lombok.extern.slf4j.Slf4j;

@AllArgsConstructor
@Slf4j
@Getter
public enum SystemErrorType implements ErrorType {
    SYSTEM_SUCCESS("000000", "处理成功", "action success"),

    SYSTEM_ERROR("-1", "系统异常", "system error"),

    SYSTEM_BUSY("000001", "系统繁忙,请稍候再试", ""),
    SYSTEM_NO_PERMISSION("000002", "无权限", ""),

    GATEWAY_NOT_FOUND_SERVICE("010404", "服务未找到", ""),
    GATEWAY_ERROR("010500", "网关异常", ""),
    GATEWAY_CONNECT_TIME_OUT("010002", "网关超时", ""),

    ARGUMENT_NOT_VALID("020000", "请求参数校验不通过", ""),
    UPLOAD_FILE_SIZE_LIMIT("020001", "上传文件大小超过限制", ""),

    FIND_ERROR("020002", "查找错误", "find error"),
    EDIT_ERROR("020003", "更新错误", "edit error"),
    ADD_ERROR("020004", "添加错误", "add error"),
    DELETE_ERROR("020005", "删除错误", "delete error"),

    ;

    /**/
    /**
     * 错误类型码
     */
    private String code;

    /**
     * 错误类型描述信息(中文)
     */
    private String cnMessage;
    /**
     * 错误类型描述信息(英文)
     */
    private String enMessage;
}
